package org.project.api.Vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.project.pojo.monthCost;
import org.project.utils.ArraysUtils;

/**
 * @Auther: hzy
 * @Date: 2022/4/15 21:54
 * @Description: 商品价格
 */
@Data
public class monthCostVo {
    @ApiModelProperty(value = "月份")
    private Integer[] month;

    @ApiModelProperty(value = "价格")
    private Double[] cost;

    public monthCostVo(monthCost val) {
        this.month = ArraysUtils.processLineInt(val.getMonth().substring(1, val.getMonth().length() - 1).split(","));
        this.cost = ArraysUtils.processLine(val.getCost().substring(1, val.getCost().length() - 1).split(","));
    }
}
